import { lazy } from 'react';
import lazyRoute from '@/router/components/LazyRoute';
import Example from '@/pages/Example';
const ExampleA = lazy(() => import('@/pages/Example/ExampleA'));
const ExampleB = lazy(() => import('@/pages/Example/ExampleB'));
const router = [
    {
        path: 'example',
        element: lazyRoute(<Example />),
        breadcrumb: '案例',
        children: [
            {
                path: 'demoA',
                // 页面需要缓存
                element: lazyRoute(<ExampleA />, true),
                breadcrumb: '案例A',
            },
            {
                path: 'demoB',
                // 页面不需要缓存
                element: lazyRoute(<ExampleB />),
                breadcrumb: '案例B',
            },
        ],
    },
];
export default router;
